# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=kig
pkgver=24.02.2
pkgrel=0
pkgdesc="Interactive Geometry"
url="https://edu.kde.org/kig"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	extra-cmake-modules
	karchive5-dev
	kconfigwidgets5-dev
	kcoreaddons5-dev
	kcrash5-dev
	kdoctools5-dev
	ki18n5-dev
	kiconthemes5-dev
	kparts5-dev
	ktexteditor5-dev
	kxmlgui5-dev
	qt5-qtbase-dev
	qt5-qtsvg-dev
	samurai
	"
subpackages="$pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/education/kig.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kig-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
8757a335a85cf1439e7abc3abe55aca9d3dd8962c550ded953d79fe3a752770469e56300679ecf821262f2aef9be7e8e45093f47126f702823b6e654850deb1c  kig-24.02.2.tar.xz
"
